<template>
  <div class="blockchain-container">
    <div class="blockchain-header">
      <h2>区块链管理</h2>
    </div>
    <div class="blockchain-content">
      <el-menu
        :default-active="$route.path"
        class="blockchain-menu"
        router>
        <el-menu-item index="/blockchain">
          <i class="el-icon-document"></i>
          <span>数据存证</span>
        </el-menu-item>
        <el-menu-item index="/blockchain/verify">
          <i class="el-icon-check"></i>
          <span>数据验证</span>
        </el-menu-item>
      </el-menu>
      <div class="blockchain-main">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BlockchainIndex',
  data() {
    return {
      activeMenu: '/blockchain'
    }
  }
}
</script>

<style scoped>
.blockchain-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blockchain-header {
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}

.blockchain-header h2 {
  margin: 0;
  color: #303133;
}

.blockchain-content {
  flex: 1;
  display: flex;
  margin-top: 20px;
  background-color: #fff;
  padding: 20px;
}

.blockchain-menu {
  width: 200px;
  border-right: 1px solid #e6e6e6;
}

.blockchain-main {
  flex: 1;
  padding: 20px;
}
</style> 